import requests
import jsonpath


url = 'https://api.bilibili.com/pgc/web/timeline/v2?season_type=1'
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36'
}
r = requests.get(url=url, headers=headers)
print(type(r))
json_r = r.json()
title_name = jsonpath.jsonpath(json_r, '$.result.latest.0.title')
print(title_name)
